import { request, requestMock } from "@/utils/http";

//请求首页的三级分类列表
export const requestCategoryList = () => {
  return request.get("/api/product/getBaseCategoryList");
};

//请求banner数据
export const requestBannerList = () => {
  return requestMock.get("/banner");
};

//请求floor的数据
export const requestFloorList = () => {
  return requestMock.get("/floor");
};

//请求搜索页数据
export const requestSearchList = (params) => {
  return request.post("/api/list", params);
};
//根据skuid请求某个商品详情的数据
export const requestDetailInfo= (skuId) =>{
  return request.get(`api/item/${skuId}`);
}
//新增购物车 或者 修改购物车数量 的请求
export const requestAddOrUpdataNumCart =({skuId,skuNum}) =>{
  return request.post(`/api/cart/addToCart/${skuId}/${skuNum}`)
};
